import React from 'react'
import { useDispatch, useSelector } from 'react-redux'

export default function Uncle () {


    const count = useSelector((state) => {
        console.log(state)
        return state
    })

    //   把我们的 dispatch 释放出来 
    const dispatch = useDispatch()


    const handlerClick = () => {
        dispatch({ type: 'sub', payload: 1 })


    }
    return (
        <>
            <div>Uncle -----------  {count}</div>



            <button onClick={handlerClick}>  uncle 按钮</button>
        </>

    )
}
